home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / snip9_91.arc / UCLOCK.H < prev    next >
C/C++ Source or Header  |  1991-09-17  |  896b  |  47 lines

  1. /*
  2. **  UCLOCK.H
  3. */
  4.  
  5. #include <dos.h>
  6. #include <time.h>
  7.  
  8. #if defined(__ZTC__)
  9.  #include <int.h>
  10.  #undef int_on
  11.  #undef int_off
  12. #elif defined(__TURBOC__)
  13.  #define int_on         enable
  14.  #define int_off        disable
  15.  #ifndef inp
  16.   #define inp           inportb
  17.  #endif
  18.  #ifndef outp
  19.   #define outp          outportb
  20.  #endif
  21. #else /* assume MSC/QC */
  22.  #include <conio.h>
  23.  #define int_on         _enable
  24.  #define int_off        _disable
  25.  #ifndef MK_FP
  26.   #define MK_FP(seg,offset) \
  27.         ((void far *)(((unsigned long)(seg)<<16) | (unsigned)(offset)))
  28.  #endif
  29. #endif
  30.  
  31. /* ANSI-equivalent declarations and prototypes */
  32.  
  33. typedef unsigned long uclock_t;
  34.  
  35. #define UCLK_TCK 1000000L /* Usec per second - replaces CLK_TCK         */
  36.  
  37. #if __cplusplus
  38.  extern "C" {
  39. #endif
  40.  
  41. uclock_t usec_clock(void);
  42. void     restart_uclock(void);
  43.  
  44. #if __cplusplus
  45.  }
  46. #endif
  47.